Ubuntu 14.04
Sponsored Link

Network Settings
2014/04/18
[1] Change to static IP addres if you use Ubuntu as a server.
root@dlp:~#
vi /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
# comment out

#
iface eth0 inet dhcp
# add these lines

iface eth0 inet static
address 10.0.0.30
# IP address

network 10.0.0.0
# network address

netmask 255.255.255.0
# subnet mask

broadcast 10.0.0.255
# broadcast address

gateway 10.0.0.1
# default gateway

dns-nameservers 10.0.0.10
# name server
root@dlp:~#
ifdown eth0 && ifup eth0

[2] Disable IPv6 if not needed.
root@dlp:~#
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf

root@dlp:~#
sysctl -p
root@dlp:~#
eth0      Link encap:Ethernet  HWaddr 00:0c:29:f9:15:ee
          inet addr:10.0.0.30  Bcast:10.0.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:851 errors:0 dropped:0 overruns:0 frame:0
          TX packets:753 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:79431 (79.4 KB)  TX bytes:97008 (97.0 KB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1184 (1.1 KB)  TX bytes:1184 (1.1 KB)
 
Tweet